<?php

namespace Apps\Common\Models;

/**
 * 运营用于回答问题的用户Model
 * @author     chenxiaolin
 * @date        2016年1月19日
 * @version     2.0.0
 * @copyright   Copyright 2016 meelier.com
 */
class OmQuestionAnswerUser extends \PhalconPlus\Database\Model
{
    /**
     *
     * @var integer
     */
    public $qau_id;

    /**
     *
     * @var integer
     */
    public $op_id;

    /**
     *
     * @var integer
     */
    public $user_id;

    /**
     *
     * @var string
     */
    public $qau_addtime;

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'om_question_answer_user';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return OmQuestionAnswerUser[]
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return OmQuestionAnswerUser
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

    /**
     * Independent Column Mapping.
     * Keys are the real names in the table and the values their names in the application
     *
     * @return array
     */
    public function columnMap()
    {
        return array(
            'qau_id' => 'qau_id',
            'op_id' => 'op_id',
            'user_id' => 'user_id',
            'qau_addtime' => 'qau_addtime'
        );
    }

    public function defaultColumns()
    {
        return [
            'qau_addtime',
        ];
    }
}